<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <style>
        .box {
            width: 80%;
            background-color: antiquewhite;
            margin-bottom: 20px;
        }

        .child {
            width: 100px;
            height: 100px;
            float: left;
            background-color: aqua;
        }

        .box2 {
            margin-top: 20px;
            height: 200px;
            background-color: #000;
        }

        .clear {
            clear: both;
        }
    </style>
    <div class="box">
        <div class="child">1</div>
        <div class="child">2</div>
        <div class="clear"></div>
        <!-- 这个玩意可以解决高度塌陷的问题啊啊哈哈哈 -->
    </div>
    <!-- <div class="clear"></div> -->
    <div class="box2">

    </div>
</body>

</html>